-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache loaded repos in ProvisioningContext #517
base: master
Are you sure you want to change the base?
Conversation
Test Results 375 files ±0 375 suites ±0 47m 54s ⏱️ +59s For more details on these failures, see this check. Results for commit 5bc1d2d. ± Comparison against base commit 385d266. ♻️ This comment has been updated with latest results. |
I guess this same problem doesn't arise for ProvisioningContext.getLoadedArtifactRepositories(IProgressMonitor)? One concern I have here is that one can call org.eclipse.equinox.p2.engine.ProvisioningContext.setMetadataRepositories(URI...) in the API and result of getLoadedMetadataRepositories depends on that value so probably it would be most proper to clear the cache when that setter is called. |
The ProvisionContext is kind of messy... e.g. it says
in fact the artifact repositories are only loaded fully when the metadata is queried and so on. Of course this "distinct lifecycle" is no where described :-\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine.
repositorie is spelled wrong, but it was that way before. 😱
3f2f8ec
to
1436f0b
Compare
5b126d4
to
85b0b03
Compare
Currently if fetching updates the provision context is queried multiple times leading to the repositories loaded multiple times, even though this is usually faster as repo are cached this still produces unnecessary workload, especially if there is one failed repository it will be tried to be loaded over and over again. This now caches the repositories loaded on first access to speed that up.
Currently ProvisioningContextTest.testFollowHelpsResolve() assumes it can modify the context repositories after using the context but this is not valid according to API.
85b0b03
to
5bc1d2d
Compare
Currently if fetching updates the provision context is queried multiple times leading to the repositories loaded multiple times, even though this is usually faster as repo are cached this still produces unnecessary workload, especially if there is one failed repository it will be tried to be loaded over and over again.
This now caches the repositories loaded on first access to speed that up.